# $Id: PKGBUILD 67524 2012-03-13 10:32:39Z lcarlier $
# Maintainer: Andrea Scarpino <andrea@archlinux.org>
# Contributor: Allan McRae <allan@archlinux.org>
# Contributor: Thomas Haider <t.haider@vcnc.org>

pkgname=libev
pkgver=4.11
pkgrel=1
pkgdesc="A full-featured and high-performance event loop"
arch=('i686' 'x86_64')
url="http://software.schmorp.de/pkg/libev.html"
license=('BSD')
depends=('glibc')
options=('!libtool')
source=(http://dist.schmorp.de/${pkgname}/${pkgname}-${pkgver}.tar.gz)
sha1sums=('e7752a518742c0f8086a8005aa7efcc4dcf02ed9')

build() {
  cd "${srcdir}/${pkgname}-${pkgver}"

  ./configure --prefix=/usr
  make
}

package() {
  cd "${srcdir}/${pkgname}-${pkgver}"

  make DESTDIR="${pkgdir}" install

  # fix conflict with libevent
  rm ${pkgdir}/usr/include/event.h
  
  install -Dm644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
}
